export default {
    QueryUserList({ commit }, param) {
        return window.$http.post(`${window.RPConfig.demo}/user/findUserListPage`, param).then(response => response && response.data)
    },
    GetUserDetail({ commit }, param) {
        return window.$http.post(`${window.RPConfig.demo}/user/get?userId=` + param.id).then(response => response && response.data)
    },
    AddUser({ commit }, param) {
        return window.$http.post(`${window.RPConfig.demo}/user/add`, param).then(response => response && response.data).catch(reason => reason && reason.response && reason.response.data);
    },
    UpdateUser({ commit }, param) {
        return window.$http.post(`${window.RPConfig.demo}/user/update`, param).then(response => response && response.data).catch(reason => reason && reason.response && reason.response.data);
    },
    DeleteUserForDemo({ commit }, param) {
        return window.$http.post(`${window.RPConfig.demo}/user/deleteById?userId=` + param.id).then(response => response && response.data).catch(reason => reason && reason.response && reason.response.data);
    },
}